home *** CD-ROM | disk | FTP | other *** search
/ STraTOS 1997 April & May / STraTOS 1 - 1997 April & May.iso / CD01 / INTERNET / SITES / GRAHAM / XA_6S.ZIP / SOURCE / XA_GLOBL.H < prev    next >
Encoding:
C/C++ Source or Header  |  1996-10-19  |  2.8 KB  |  86 lines

  1. /*
  2.  * XaAES - XaAES Ain't the AES
  3.  *
  4.  * A multitasking AES replacement for MiNT
  5.  *
  6.  */
  7.  
  8. #ifndef _XA_GLOBL_H_
  9. #define _XA_GLOBL_H_
  10.  
  11. #include <VDI.H>
  12. #include "KERNAL.H"
  13. #include "K_DEFS.H"
  14. #include "XA_TYPES.H"
  15. #include "EVENT_Q.H"
  16.  
  17. /*
  18.     GLOBAL VARIABLES AND DATA STRUCTURES
  19. */
  20.  
  21. #define MAX_PID 500                        /* maximum number of processes we can handle */
  22.  
  23. extern short AESpid;                    /* XaAES's MiNT process id. */
  24.  
  25. extern short P_handle,V_handle;            /* Workstation handles used by the AES */
  26. extern XA_SCREEN display;                /* The display descriptor */
  27.  
  28. extern void *super_stack;                /* Supervisor mode stack */
  29.  
  30. extern far long AES_in_pipe;            /* The AES instruction pipe handle */
  31. extern unsigned long client_handle_mask;
  32.  
  33. extern far long MOUSE_dev;                /* The MOUSE (/dev/moose) device handle */
  34. extern short double_click_time;            /* The current mouse double click timing */
  35.  
  36. extern long KBD_device;                    /* The MiNT keyboard device's file handle */
  37.  
  38. extern short debug_file;                /* File handle to dump debug stuff to */
  39.  
  40. extern unsigned long kernal_a4;
  41. extern unsigned long kernal_a6;
  42.  
  43. extern XA_WINDOW *window_list;            /* The global windows list */
  44. extern XA_WINDOW *root_window;            /* The desktop window */
  45.  
  46. extern short update_lock;                /* wind_update() locks */
  47. extern short mouse_lock;
  48. extern short update_cnt;
  49. extern short mouse_cnt;
  50.  
  51. extern AESPB new_client_pb;
  52. extern K_CMD_PACKET new_client_packet;
  53. extern short client_exit_contrl[];
  54.  
  55. extern char XaAES_home[200];            /* XaAES's home location */
  56. extern short XaAES_home_drv;
  57.  
  58. extern char scrap_path[128];            /* Clipboard directory path */
  59.  
  60. extern void *system_resources;            /* Pointer to the XaAES resources */
  61. extern const char dummy_cmd_tail[], dummy_cmd_name[];
  62.  
  63. extern far AESroutine Ktable[300];        /* The main AES kernal command jump table */
  64. extern far short Kcall_direct[300];        /* array of flags to indicate that routines should be direct called */
  65. extern far XA_CLIENT clients[MAX_PID+1];    /* The main data structure is the clients database */
  66.  
  67. extern OBJECT *desktop;                    /* The desktop/root window object tree */
  68. extern OBJECT *def_widgets;        /* Form containing the standard widgets */
  69.  
  70. extern short iconify_x,iconify_y,iconify_w,iconify_h;    /* Positioning information for iconifying windows */
  71.  
  72. extern short shutdown;
  73.  
  74. extern const unsigned char character_type[];
  75.  
  76. /* Martin's stuff to help get rid of the clients array */
  77. #define Pid2Client(pid) ((((pid)<MAX_PID)&&((pid)>0))?&clients[pid]:(XA_CLIENT*)NULL)    /* AES pid -> client pointer */
  78. #define Client2Pid(client_p)    ((short)((XA_CLIENT*)client_p-&clients[0]))
  79.                                         /* client pointer -> AES pid */
  80.  
  81. /* The following two are useful for running through the entire client list: */
  82. XA_CLIENT *FirstClient(void);
  83. XA_CLIENT *NextClient(XA_CLIENT *this);
  84.  
  85. #endif
  86.